package com.frank.oj.service.oj;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.frank.model.entity.judge.Judge;
import com.frank.oj.common.result.CommonResult;
import com.frank.oj.model.dto.SubmitIdListDTO;
import com.frank.oj.model.dto.SubmitJudgeDTO;
import com.frank.oj.model.dto.TestJudgeDTO;
import com.frank.oj.model.vo.JudgeCaseVO;
import com.frank.oj.model.vo.JudgeVO;
import com.frank.oj.model.vo.SubmissionInfoVO;
import com.frank.oj.model.vo.TestJudgeVO;

import java.util.HashMap;

/**
 * @author frank
 * @Date 2024/3/24
 */
public interface JudgeService {
    CommonResult<IPage<JudgeVO>> getJudgeList(Integer limit, Integer currentPage, Boolean onlyMine, String searchPid, Integer searchStatus, String searchUsername, Boolean completeProblemID, Long gid);

    CommonResult<SubmissionInfoVO> getSubmission(Long submitId);

    CommonResult<JudgeCaseVO> getAllCaseResult(Long submitId);

    CommonResult<Void> updateSubmission(Judge judge);

    CommonResult<String> submitProblemTestJudge(TestJudgeDTO testJudgeDTO);

    CommonResult<Judge> submitProblemJudge(SubmitJudgeDTO judgeDto);

    CommonResult<TestJudgeVO> getTestJudgeResult(String testJudgeKey);

    CommonResult<HashMap<Long, Object>> checkCommonJudgeResult(SubmitIdListDTO submitIdListDto);

    CommonResult<HashMap<Long, Object>> checkContestJudgeResult(SubmitIdListDTO submitIdListDto);

    CommonResult<Judge> resubmit(Long submitId);
}
